package com.lwj.liwanjia.view.activity.supermarket;

import android.os.Bundle;
import android.support.v7.widget.LinearLayoutManager;
import android.view.View;
import android.widget.EditText;
import android.widget.TextView;

import com.lwj.liwanjia.R;
import com.lwj.liwanjia.adapter.KeFuAdapter;
import com.lwj.liwanjia.base.BaseActivity;
import com.superrecycleview.superlibrary.recycleview.SuperRecyclerView;

import java.util.ArrayList;
import java.util.List;

import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.OnClick;

public class KefuActivity extends BaseActivity {

    @BindView(R.id.tv_left)
    TextView tvLeft;
    @BindView(R.id.tv_title)
    TextView tvTitle;
    @BindView(R.id.rlv_chat)
    SuperRecyclerView rlvChat;
    @BindView(R.id.ed_content)
    EditText edContent;

    private KeFuAdapter adapter;
    private List<String> list = new ArrayList<>();

    @Override
    protected void initView() {
        tvLeft.setVisibility(View.VISIBLE);
        tvTitle.setText("恒源客服");
        LinearLayoutManager manager = new LinearLayoutManager(this);
        manager.setOrientation(LinearLayoutManager.VERTICAL);
        rlvChat.setLayoutManager(manager);
        rlvChat.setRefreshEnabled(false);
        rlvChat.setLoadMoreEnabled(false);
        adapter = new KeFuAdapter(this, list);
        rlvChat.setAdapter(adapter);
    }

    @Override
    protected void initData() {
        list.add("0");
        list.add("1");
    }

    @Override
    protected int getLayoutId() {
        return R.layout.activity_kefu;
    }

    @OnClick({R.id.tv_left, R.id.tv_send})
    public void onViewClicked(View view) {
        switch (view.getId()) {
            case R.id.tv_left:
                finish();
                break;
            case R.id.tv_send:
                break;
        }
    }
}
